var app = app || {};
app.acceleration = {};
app.acceleration.ax = 0.5;
app.acceleration.ballX = 0;
app.acceleration.vx = 0;


(function($) {

	$(function() {

		var ax = app.acceleration.ax;
		var ballX = app.acceleration.ballX;
		var vx = app.acceleration.vx;

		setInterval(function() {

			ballX += vx;
			vx += ax;
			
			if(ballX > 1400){
				ballX = 0;
				vx = 0;
			}

			$('#ball').css('left', ballX);

		}, (1000 / 24));
	});
})(jQuery);